Livesync-Bridge
vrtmrz/livesync-bridge (github.com)
Self-hosted LiveSync is a community implemented synchronization plugin.
A self-hosted or purchased CouchDB acts as the intermediate server.
This is how I keep my pywriter vault in sync between my phone and other devices. I also use it to sync up with my Dungeon's & Dragons vault.
connections
installation
backend
- spin up a CouchDB server and make it public facing via Nginx Proxy Manager. vrtmrz also has an all in one solution if your are not currently using a Reverse Proxy
./compose.yml
version: "3.7"
services:
obsidianDB_dnd:
image: couchdb:3.1.2
restart: always
ports:
- "5984:5984"
networks:
- nginx-prox-mgmt-3_default
environment:
- COUCHDB_USER=<ADMIN_USER>
- COUCHDB_PASSWORD=<STRONG_PASSWORD>
volumes:
- /mnt/<EXTERNAL_DRIVE>/obsidian-livesync-data/vault1:/opt/couchdb/data
- ./local.ini:/opt/couchdb/etc/local.ini
networks:
nginx-prox-mgmt-3_default:
external: true
./local.ini
[couchdb]
single_node=true
[chttpd]
require_valid_user = true
[chttpd_auth]
require_valid_user = true
authentication_redirect = /e=_/_utils/session.html
[httpd]
WWW-Authenticate = Basic realm="couchdb"
enable_cors = true
[cors]
origins = app://obsidian.md,capacitor://localhost,http://localhost
credentials = true
headers = accept, authorization, content-type, origin, referer
methods = GET, PUT, POST, HEAD, DELETE
max_age = 3600
Obsidian-livesync only syncs when 2 client instances of Obsidian are open (i.e. the mobile app and desktop app). I like to think of vrtmrz/filesystem-livesync as the #headless version of Obsidian.md that makes sure all the other are up-to-date
git clone --recursive https://github.com/vrtmrz/filesystem-livesync
cp dat/config.sample.json dat/config.json
./dat/config.json
{
"config_1": {
"server": {
"uri": "https://<URL>/<DATABASE_NAME>",
"auth": {
"username": "<COUCH_ADMIN>",
"password": "<STRONGPASSWORD>"
},
"initialScan": false,
"customChunkSize": 100
},
"local": {
"path": "./dat/vault",
"initialScan": true
},
"auto_reconnect": true,
"sync_on_connect": true
}
}
- place your vault inside
./dat/vault
your directory should look like
.
├─ etc, etc, etc
├─ package.json
├─ src
├─ docker
└─ __dat__
├─ config.json
├─ __vault__
└─ ├─ first_note.md
└─ second_note.md
Notice I don't have a .obsidian
folder in here. The Obsidian-Livesync plugin handles syncing other plugins. Then I copy over Themes and settings.
- This is an add from me to the vrtmrz/filesystem-livesync repo. If I can Docker Compose it, I will.
compose.yml
version: "3.7"
services:
server:
image: filesystem-livesync:latest
build: ./docker/Dockerfile
restart: always
environment:
- CHOKIDAR_USEPOLLING=1
volumes:
- ./dat:/data
docker compose up -d --remove-orphans
Setup new client (mobile, laptop, friend)
Regex to ignore files
- follow the plugin obsidian-livesync's instructions
- add URL of hosted CouchDB server
- creds should match "auth" in
config.json
- check the setting under the "🔁 Sync Settings" tab Regular expression to ignore files
- I wanted to ignore 2 things: any
Untitled.md
files and anything in aprivate
directory - regex copy pasta:
Untitled.*\.md$|private
``
- I wanted to ignore 2 things: any
Setup my DnD-Live vault
- start a new vault folder
dnd-live
- Core Options
- "Editor"
- Spellcheck - on
- "File & Links"
- Default location for new notes -
same folder as current file
- New link format -
Absolute path in vault
- Default location for new attachments -
In subfolder under current folder
- Subfolder name -
_attachments
- Default location for new notes -
- "Appearance"
- CSS snippets - turn on first one
- copy / replace files from
.obsidian
appearance.json
core-plugins.json
graph.json
hotkeys.json
templates.json
- "Editor"
- download
obsidian-livesync
from Community Plugins - follow Regex to ignore files to ignore correct files / folders also
|📁 Dungeon Master
- 🛰 Remote Database tab
- URI
https://dungeon-db.williamusic.com/dnd-live
- Username:
admin_dnd
- Password:
***
- Database name:
dnd-live
- Test Database Connection
- URI
- 🔧 Miscellaneous
- Presets - Livesync - click
- Add
.obsidian
plugins and configurations- copy from
cloutdrive
link
- copy from